{% extends "reviewers/base.html" %}

{% block title %} Reviewer Moderation Log – Add-ons for Firefox {% endblock %}

{% block content %}
<h2>Moderated Review Log</h2>

<div class="listing results">
  <div class="results-inner controls">
    <form action="{{ url('reviewers.ratings_moderation_log') }}" data-no-csrf>
      <p class="date_range">
        {{ form.start.label_tag() }}
        {{ form.start }}
        {{ form.end.label_tag() }}
        {{ form.end }}

        &bullet;

        {{ form.filter.label_tag() }}
        {{ form.filter }}
        <button type="submit">Filter</button>
      </p>
    </form>
    {% if pager.object_list %}
      <table class="data-grid">
        <thead><tr class="listing-header">
          <th>Date</th>
          <th>Event</th>
        </tr></thead>
        <tbody>
          {% for item in pager.object_list %}
          <tr>
            <td>
              {{ item.created|datetime }}
            </td>
            <td>
              {{ item.to_string('reviewer') }}
              {% if item.details %}
              <a class="more-details"
                 href="{{ url('reviewers.ratings_moderation_log.detail', item.id) }}">
                More details.
              </a>
              {% endif %}
            </td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
    {% else %}
      <p class="no-results">No events found for this period.</p>
    {% endif %}
  </div>

  {% if pager.has_other_pages() %}
  <div class="listing-footer">
    {{ pager|paginator }}
  </div>
  {% endif %}
</div>
{% endblock %}
